<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <title>${session.SOFT_NAME }_智能办公系统</title>
    <meta name="description" content="Dashboard"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%include("/app/resapi/style.html"){}%>
</head>
<body style="overflow-y: auto;">
<div class="page-body" style="padding: 0px">
    <div class="page-container">
        <div class="col-md-12 col-sm-12 col-xs-12" style="padding:0px">
            <div class="well with-header">
                <div class="header bordered-blueberry">督查督办事件详情</div>
                <form class="form-horizontal form-bordered" id="from">
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">督查标题：</label>
                        <div class="col-sm-5" id="title" style="line-height: 34px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">事件类型：</label>
                        <div class="col-sm-2" id="configId" style="line-height: 34px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">督查领导：</label>
                        <div class="col-sm-2" id="leadId" style="line-height: 34px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">${i18n('system.beginTime')}：</label>
                        <div class="col-sm-2" id="beginTime" style="line-height: 34px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">完成时间：</label>
                        <div class="col-sm-2" id="endTime" style="line-height: 34px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">牵头人：</label>
                        <div class="col-sm-2" id="handedUser" style="line-height: 34px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">参与人员：</label>
                        <div class="col-sm-5" id="joinUser" style="line-height: 34px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">任务内容：</label>
                        <div class="col-sm-10" id="content" style="line-height: 34px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label no-padding-right">${i18n('attach')} ：</label>
                        <div class="col-sm-5" id="attach">
                            <div id="show_attach"></div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<%include("/app/resapi/sysjs.html"){}%>
<script type="text/javascript">
    var superversionId = "${parameter.superversionId}";
</script>
<script type="text/javascript" src="/module/fileupload/ajaxfileupload.js"></script>
<script type="text/javascript" src="/module/fileupload/fileupload.js"></script>
<script type="text/javascript">
    $(function () {
        $.ajax({
            url: "/ret/superversionget/getSuperversionById",
            type: "post",
            dataType: "json",
            data: {superversionId: superversionId},
            success: function (data) {
                if (data.status == "500") {
                    console.log(data.msg);
                } else if (data.status == "100") {
                    layer.msg(data.msg);
                } else {
                    for (var name in data.list) {
                        if (name == "attach") {
                            $("#attach").attr("data_value", data.list.attach);
                            createAttach("attach", "1");
                        } else if (name == "createUser") {
                            $("#" + name).html(getUserNameByStr(data.list.createUser));
                        } else if (name == "type") {
                            $("#configId").html(getConfigName(data.list[name]));
                        } else if (name == "handedUser") {
                            $("#" + name).html(getUserNameByStr(data.list[name]));
                        } else if (name == "joinUser") {
                            $("#" + name).html(getUserNameByStr(data.list[name]));
                        } else if (name == "leadId") {
                            $("#" + name).html(getUserNameByStr(data.list[name]));
                        } else {
                            $("#" + name).html(data.list[name]);
                        }
                    }
                }
            }
        })
    });

    function getConfigName(configId) {
        var returnStr = "";
        $.ajax({
            url: "/ret/superversionget/getSuperversionConfigById",
            type: "post",
            dataType: "json",
            async: false,
            data: {configId: configId},
            success: function (data) {
                console.log(data);
                if (data.status == "500") {
                } else if (data.status == "100") {
                    layer.msg(data.msg);
                } else {
                    returnStr = data.list.typeName;
                }
            }
        })
        return returnStr;
    }
</script>
</body>
</html>
